package com.behelpful.common.core.result;

/**
 * 错误响应枚举
 *
 * @author Alay
 * @date 2021-07-07 09:25
 */
public enum ErrorResult implements BaseResult {

    /**
     * 请求成功时响应结果
     */
    ERROR("E00000", "ERROR"),
    UN_KNOW_ERROR("E00001", "未知错误"),
    PARAMETER_ERROR("E00002", "参数错误"),
    ACCOUNT_OR_PWD_ERROR("E00003", "用户名或密码不正确"),
    BAD_CREDENTIAL("E00004", "Bad credentials"),
    ACCOUNT_IS_LOCKED("E00005", "账号已经被锁定"),
    USER_IS_DISABLED("E00006", "用户已被停用"),
    USER_ACCOUNT_HAS_EXPIRED("E00007", "用户信息已过期"),
    VALIDATE_TYPE_NONSUPPORT("E00008", "验证类型不支持"),
    VALIDATE_CODE_EMPTY("E00009", "验证码不能为空"),
    VALIDATE_CODE_ERR("E00010", "验证码不合法"),
    ILLEGAL_REQUEST("E00011", "非法请求"),
    NO_INTERFACE_ERR("E00012", "代理类没有实现的接口"),
    ;


    ErrorResult(String code, String message) {
        this.code = code;
        this.message = message;
    }

    /**
     * 通用错误响应枚举
     */
    private String code;
    /**
     * 响应消息
     */
    private String message;

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
